<%@include file="/pages/commons/common.jsp"%>
<%@taglib prefix="opt" uri="http://www.baozun.cn/option"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>商品范围编辑</title>
<%@include file="/pages/commons/common-css.jsp"%>
<%@include file="/pages/commons/common-javascript.jsp"%>
<link rel="stylesheet" href="${base}/scripts/jquery/ztree/zTreeStyle.css" type="text/css"></link>
<script type="text/javascript" src="${base}/scripts/jquery/ztree/jquery.ztree.all-3.5.js"></script>
<link rel="stylesheet" href="${base}/scripts/jquery/jrule/jrule.css" type="text/css"></link>
<script type="text/javascript" src="${base}/scripts/jquery/jrule/jrule.js"></script>
<script type="text/javascript" src="${base}/scripts/product/scope/scope-edit.js"></script>
<script type="text/javascript" src="${base}/scripts/search-filter.js"></script>
<script type="text/javascript">
	
var categoryzNodes  = [
     <c:forEach var="category" items="${categoryList}" varStatus="status">
     	<c:set var="isRoot" value="${null eq category.parentId}"></c:set>
     	{id:${category.id}, pId:${isRoot?0:category.parentId}, 
     		name:"${category.name}",
     		code:"${category.code}", sortNo:${category.sortNo}, 
     		<c:forEach var="checkedCategory" items="${categories}">
     		       <c:if test="${checkedCategory.id ==category.id}">
     		            checked:true,
     		       </c:if>
     		</c:forEach>
     		drag:${!isRoot}, open:${isRoot?true:false},
     		lifecycle:${category.lifecycle} } 
     	<c:if test="${!status.last}">,</c:if>
     </c:forEach>
];
</script>
</head>
<body>
	<div class="content-box">
		<div class="ui-block">
			<div class="ui-block-title1">商品范围编辑</div>
			<div class="ui-block-content border-grey" style="margin-bottom: 10px;">
				<div class="ui-block-line">
					<label>范围名称 </label>
					<div class="wl-right">
						<input id="scope_name" type="text" loxiaType="input" value="" mandatory="true" size="50" />
					</div>
				</div>
				<div class="ui-block-line">
					<div class="_test"></div>
				</div>
				<div class="ui-block-line">
					<input type="button" value="获取字符串" class="button orange ctl-getrule">
				</div>
				<div class="ui-block-line sv"></div>
				<div class="ui-block-line dv"></div>
			</div>
		</div>
	</div>
</body>
<ul id="treeDemo" class="ztree"
	style="display: none; position: absolute; background-color: #f0f6e4; border: 1px solid #617775; padding: 3px;"
></ul>
<div id="dialog-item-select" class="proto-dialog">
	<h5>选择商品</h5>
	<div class="ui-block-content" style="padding-top: 0">
		<div>
			<div class="border-grey ui-loxia-simple-table" id="itemTable"
				caption="<spring:message code='itemcategory.classified.list'/>"
			></div>
		</div>
		<div>
			<form action="/product/scope/findItem.json" id="searchForm">
				<input type="hidden" id="shopId" name="q_long_shopId" value="${shopId }" />
				<table>
					<tr>
						<td>
							<span id="searchkeytext">
								<input type="text" loxiaType="input" mandatory="false" id="code" name="q_sl_code"
									placeholder="<spring:message code='item.code'/>"
								></input>
							</span>
						</td>
						<td>
							<span id="searchkeytext">
								<input type="text" loxiaType="input" mandatory="false" id="title" name="q_sl_title"
									placeholder="<spring:message code='item.name'/>"
								>
							</span>
							</input>
						</td>
						<td>
							<input type="button" value="查询商品" class="func-button search" />
						</td>
						<td>
							<input type="button" value="选择商品" class="func-button selectItems" />
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</div>
</html>
